/*
 * @Description: 测试雪花id生成
 * @Autor: HuiSir<www.zuifengyun.com>
 * @Date: 2022-06-10 15:08:35
 * @LastEditTime: 2022-06-10 18:24:32
 */
import GenId from '../helper/GenId.js'

function test1 () {
    const genid = new GenId({ WorkerId: 1 })
    for (let index = 0; index < 5000; index++) {
        console.log(genid.NextId());
    }
}
function test2 () {
    const genid = new GenId({ WorkerId: 12 })
    for (let i = 0; i < 10; i++) {
        let id1 = genid.NextNumber()
        console.log(`${i} ${id1} ${typeof id1} 长度：${id1.toString().length}`)
    }
}

function main () {
    test2()
}
main()